<?php

require_once 'Core/Controller/Action.php';

class Admin_UtilController extends Core_Controller_Action
{
    /**
     * Render partial action
     *
     * @throws Core_Exception
     * @return void
     */
    public function renderPartialAction()
    {
        parent::init();

        $partial = $this->_request->getParam('partial');
        if ($partial != null) {
            $this->view->partialKey = Core_Toolbox_String::stripUnderscores($partial);
            $data = new stdClass();
            $data->get = $this->_request->getParams();
            $data->post = $_POST;
            $this->view->data = $data;
        } else {
            throw new Core_Exception($this->view->getTranslation('Invalid placeholder passed'));
        }
    }

}